﻿using Newtonsoft.Json;
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Alison.EFCore.Dto
{
    /// <summary>
    /// 菜单
    /// </summary>
    [SwaggerSchema(Title = "菜单MenuDto", Description = "菜单Class")]
    public class MenuDto : BaseDto
    {
        /// <summary>
        /// 菜单代码
        /// </summary>
        [JsonProperty("menuCode")]
        [Description("菜单代码")]
        [SwaggerSchema(Title = "菜单", Description = "菜单代码")]
        [StringLength(20, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 2)]
        public string MenuCode { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        [JsonProperty("menuName")]
        [Description("菜单名称")]
        [SwaggerSchema(Title = "菜单", Description = "菜单名称")]
        [StringLength(20, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 2)]
        public string MenuName { get; set; }

        /// <summary>
        /// 菜单标题
        /// </summary>
        [JsonProperty("menuCaption")]
        [Description("菜单标题")]
        [SwaggerSchema(Title = "菜单", Description = "菜单标题")]
        public string MenuCaption { get; set; }

        /// <summary>
        /// 命名空间
        /// </summary>
        [JsonProperty("menuNameSpace")]
        [SwaggerSchema(Title = "菜单", Description = "命名空间")]
        public string MenuNameSpace { get; set; }

        /// <summary>
        /// 所属权限值
        /// </summary>
        [JsonProperty("menuAuth")]
        [SwaggerSchema(Title = "菜单", Description = "所属权限值")]
        public int? MenuAuth { get; set; }
    }
}
